<script>

    $(function () {

        var form = new Vue({
            el:'#div',
            data:{
                agree:true,
                refund_result_type:window.refund_result_type,
                arbitrate_result_type:window.arbitrate_result_type,
            },
            mounted:function(){
            },
            methods:{
            },
            components:{
            }
        });

        var validator = $("#form").validate({
            rules: {
                refund_result_type:{
                    required:true,
                },
                refund_refuse_reason:{
                    required:function(){
                        return form.agree == false;
                    },
                    maxlength:100
                },
            },
            messages: {
                refund_result_type: {
                    required:'请选择同意或不同意退款申请',
                },
                refund_refuse_reason:{
                    required:'请填写拒绝退款原因',
                    maxlength:'拒绝退款原因请限制在100字以内'
                },
            },
            submitHandler: function(form) {
                form.submit();
            },
        });
    });
</script>